public class StringDemo12 {
    public static void main(String[] args) {
        long start = System.currentTimeMillis();
        String s = " ";
        for (int i = 0; i <= 10000; i++) {
            s += i;
        }

        long end  =System.currentTimeMillis();
        System.out.println(end - start);

        start = System.currentTimeMillis();
        StringBuffer stringBuffer = new StringBuffer(" ");
        for (int i = 0; i <= 10000 ; i++) {
            stringBuffer.append(i);
        }
        end = System.currentTimeMillis();

        System.out.println(end - start);
    }
}
